package com.itcast.database.smooth.repository;

import com.itcast.database.smooth.entity.TradeOrder;
import javafx.beans.binding.StringExpression;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer;
import org.springframework.data.querydsl.binding.QuerydslBindings;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TradeOrderRepository extends PagingAndSortingRepository<TradeOrder, Long>, JpaSpecificationExecutor<TradeOrder>{

    /**
     * 根据账户编号获取订单信息
     * @param accountNo
     * @return
     */
    List<TradeOrder> findAllByAccountNo(@Param("accountNo") Long accountNo);

    /**
     * 获取所有订单
     * @return
     */
    List<TradeOrder> findAll();

}
